Skip to content

docs: remove smooth behavior from SideNav autoscroll#9828

Open
reidbarber wants to merge 1 commit intomainfrom
docs-remove-smooth-autoscroll
Open

docs: remove smooth behavior from SideNav autoscroll#9828
reidbarber wants to merge 1 commit intomainfrom
docs-remove-smooth-autoscroll

Conversation

@reidbarber
Copy link
Copy Markdown
Member

Removes smooth behavior from SideNav auto-scroll.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Open a page like Testing and confirm that auto-scrolling is no longer smooth.

🧢 Your Project:

@rspbot
Copy link
Copy Markdown

rspbot commented Mar 23, 2026

}

link.scrollIntoView({block: 'start', behavior: 'smooth'});
link.scrollIntoView({block: 'start'});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that it scrolls even when you click on a link in the sidebar. For example scroll down and then click a link near the top, it will move when you click it. Maybe we should only do this on the initial page load?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand what you mean correctly, this should be fixed when using our shim here instead, as that implements the equivalent of scrollIntoViewIfNeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants